﻿using System.Web.Mvc;

namespace FashionShop.Areas.Home
{
    public class HomeAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Home";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            // routes.MapRoute(
            //    name: "Hello",
            //    url: "Hello/{id}",
            //    defaults: new { controller = "Hello", action = "World", id = UrlParameter.Optional }
            //);

            context.MapRoute(
                "gio hang",
                "gio-hang",
                new { controller = "Customer", action = "Index", id = UrlParameter.Optional }
                //new { action = "Index", id = UrlParameter.Optional }
            );

            context.MapRoute(
                "phan-loai",
                "phan-loai/{url}",
                new { controller = "ProductCatalogue", action = "Index", id = UrlParameter.Optional }
                //new { action = "Index", id = UrlParameter.Optional }
            );

            context.MapRoute(
                "Thuong hieu",
                "thuong-hieu/{url}",
                new { controller = "Brand", action = "Index", id = UrlParameter.Optional }
                //new { action = "Index", id = UrlParameter.Optional }
            );

            context.MapRoute(
                "San pham",
                "san-pham/{id}/{url}",
                new { controller = "Product", action = "Index", id = UrlParameter.Optional }
                //new { action = "Index", id = UrlParameter.Optional }
            );

            context.MapRoute(
                "Home_default",
                "{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                //new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
